﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MyServer.Common
{
    /// <summary>
    /// 用来存储数据发送器发送数据的事件数据绑定
    /// </summary>
    public class DataBeforeTransportEventArgs:EventArgs
    {
        /// <summary>
        /// 表示与事件绑定的数据
        /// </summary>
        public DataPackageCollection OperateData { get;private set; }

        /// <summary>
        /// 表示该事件是否需要取消或是取消状态
        /// </summary>
        public bool Canceled { get; set; }
        

        /// <summary>
        /// 构造事件绑定数据的新实例
        /// </summary>
        /// <param name="col"></param>
        public DataBeforeTransportEventArgs(DataPackageCollection col)
        {
            this.OperateData = col;
        }
        
    }

    /// <summary>
    /// 用来存储数据发送器发送数据的事件数据绑定
    /// </summary>
    public class DataAfterTransportEventArgs : EventArgs
    {
        /// <summary>
        /// 表示与事件绑定的数据
        /// </summary>
        public DataPackageCollection OperateData { get; private set; }

        /// <summary>
        /// 表示该操作是否需要取消或是取消状态
        /// </summary>
        public bool Canceled { get; set; }

        /// <summary>
        /// 表示是否成功
        /// </summary>
        public bool IsSucceed { get; set; }

        /// <summary>
        /// 构造事件绑定数据的新实例
        /// </summary>
        /// <param name="col"></param>
        public DataAfterTransportEventArgs(DataPackageCollection col)
        {
            this.OperateData = col;
        }

    }

}
